//
//  RegisterWeiAiViewController.m
//  uniquelove
//
//  Created by ibokan on 14-12-6.
//  Copyright (c) 2014年 ibokan. All rights reserved.
//

#import "RegisterWeiAiViewController.h"
#import "AFNetworking.h"
@interface RegisterWeiAiViewController ()
- (IBAction)loadBtnClicked:(id)sender;

@end

@implementation RegisterWeiAiViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)loadBtnClicked:(id)sender {
    
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    NSString *token = (NSString *)[[NSUserDefaults standardUserDefaults]objectForKey:@"accessToken"];
    NSString *userID = (NSString *)[[NSUserDefaults standardUserDefaults]objectForKey:@"userID"];
	NSDictionary *dic = @{@"access_token": token,@"uid":userID};
    
    //获取微博内容
    [manager GET:@"http://lovemyqq.sinaapp.com/login.php" parameters:dic success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"%@",responseObject);
        
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"%@",error);
    }];
    
}
@end
